Skip to content

Conversation

@martien-de-jong
Copy link
Collaborator

Small logging improvements
Facility to rerun a strategy an arbitrary number of times
Push earliest with 'local' resource conflicts

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rationale: It is difficult to give a useful absolute value. for small ResMII we will be trying way beyond usefulness, for larger ResMII it may not be enough. A relative amount works better.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also simplifies using a solver only on the first few tries

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

schuling -> scheduling

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to have some comments on these fields, for future reference.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check: those fields are not used now. Are they related to a new feature?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ScheduleInfo is passed to the strategies. These values are computed as a service to implementors of new strategies.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: 2025.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we have a description of what does feasibleRA means here? I can see that we have some conf2d_bf16 so it is interesting to also see how this one differs from the others.

@andcarminati
Copy link
Collaborator

Hi @martien-de-jong, this set of changes looks good! I just left some comments for clarification!

bool TopDown = true;
bool Alternate = false;
int Runs = 0;
ArrayRef<PriorityComponent> Components;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not own the list of components? Does that help a lot with memory usage?

struct Configuration {
int ExtraStages = 0;
bool TopDown = true;
bool Alternate = false;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice to document those fields, especially Alternate

// When we need more slots than we have data predecessors, we have local
// resource contention that we can safely account for in Earliest.
if (Count > 0 && Slots.max() > Count) {
Me.Earliest = std::max(Me.Earliest, PredEarliest + Slots.max() - 1);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checking: Do we have something similar to bias Latest based on successors? I think yes, but my memory is blurry.

Info.compute();
return true;

// If no node can be scheduled in cycle 0, we must have a circuit that
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: If no node can be scheduled in cycle 0 after accounting for LCDs, ...

// represent a valid 'regular' loop schedule.
if (NStages == 1) {
LLVM_DEBUG(dbgs() << "PostPipeliner: Degenerate pipeline, NStages=1\n");
return false;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI @andcarminati , I think that will simplify the epilogue scheduling PR.

Copy link
Collaborator

@gbossu gbossu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, and I think I want it. Let me know when you went through the comments and I will approve :)

mgehre-amd added a commit that referenced this pull request Aug 21, 2025
Bump with conflict resolution (6)
@martien-de-jong
Copy link
Collaborator Author

The important bits have been merged in other postpipeliner PRs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants